package com.hdu.degrete.controller;


import com.hdu.degrete.degrate.DegrateException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;


public class GlobalExceptionHandler {
    @ResponseBody
    @ExceptionHandler(DegrateException.class)
    public String handleDegrateException(DegrateException degrateException) {
        return degrateException.getMessage();
    }
}
